package com.common.shared.map;

import java.util.ArrayList;

import com.google.gwt.user.client.rpc.IsSerializable;

public class GisMap implements IsSerializable {

	/**
	 * 
	 */
	private int id;
	private String mapname;
	private String zoomto;
	private String width;
	private String height;

	private ArrayList<GisMapProperties> gisMaProperties = new ArrayList<GisMapProperties>();
	private ArrayList<GisLayer> gisLayers = new ArrayList<GisLayer>();

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getMapname() {
		return mapname;
	}

	public void setMapname(String mapname) {
		this.mapname = mapname;
	}

	public String getZoomto() {
		return zoomto;
	}

	public void setZoomto(String zoomto) {
		this.zoomto = zoomto;
	}

	public String getWidth() {
		return width;
	}

	public void setWidth(String width) {
		this.width = width;
	}

	public String getHeight() {
		return height;
	}

	public void setHeight(String height) {
		this.height = height;
	}

	public ArrayList<GisMapProperties> getGisMaProperties() {
		return gisMaProperties;
	}

	public void setGisMaProperties(ArrayList<GisMapProperties> gisMaProperties) {
		this.gisMaProperties = gisMaProperties;
	}

	public ArrayList<GisLayer> getGisLayers() {
		return gisLayers;
	}

	public void setGisLayers(ArrayList<GisLayer> gisLayers) {
		this.gisLayers = gisLayers;
	}

	public Object cloneObject() {
		GisMap result = new GisMap();
		result.id = id;
		result.mapname = mapname;
		result.zoomto = zoomto;
		result.width = width;
		result.height = height;

		ArrayList<GisMapProperties> gisMaProperties = new ArrayList<GisMapProperties>();
		for (GisMapProperties gisMapProperties : this.gisMaProperties) {
			gisMaProperties.add((GisMapProperties) gisMapProperties
					.cloneObject());
		}
		result.setGisMaProperties(gisMaProperties);

		ArrayList<GisLayer> gisLayers = new ArrayList<GisLayer>();
		for (GisLayer gisLayer : this.gisLayers) {
			gisLayers.add((GisLayer) gisLayer.cloneObject());
		}
		result.setGisLayers(gisLayers);
		return result;
	}

}
